import request from '@/utils/myrequest'

export function getDepartment() {
    return request({
      url: '/admin/department/list'
    })
  }

  // 添加部门
export function addDepartment(data){
  return request({
    url: "/admin/department",
    data:data,
    method:"post"
  })
}

  // 添加子部门
  export function addSubDepartmentFn(data){
    return request({
      url: "/admin/department",
      data:data,
      method:"post"
    })
  }

// 删除部门
export function deleteDepartment(deptNo){
  return request({
    url: "admin/department/"+deptNo,
    method:"delete"
  })
}